package com.dingwei.lesyndrome.utils;

import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.dingwei.lesyndrome.R;
import com.dingwei.lesyndrome.weight.CircleNumberProgressBar;


/**
 * Created by Andy.Li on 2017/3/16.
 */
public class UploadVideoDialog extends Dialog {

    Activity activity;
    CircleNumberProgressBar progressBar;
    TextView tvHint;

    public UploadVideoDialog(Activity activity) {
        super(activity, R.style.MyDialog);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.dialog_up_video);
        progressBar = (CircleNumberProgressBar) findViewById(R.id.cnpb_progress_second);
        tvHint = (TextView) findViewById(R.id.tv_hint);

        WindowManager.LayoutParams p = getWindow().getAttributes(); // 获取对话框当前的参数值
        getWindow().setAttributes(p);
        getWindow().setWindowAnimations(R.style.DialogAnimotation);
    }


    public void setProgress(int progress) {
        progressBar.setProgress(progress);

//        progressBar.setSecondaryProgress(60);
    }

    public void setHint(String textHint) {
        tvHint.setText(textHint);
    }


}
